﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FindSubarrayWithGivenGum
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = { 1, 4, 20, 3, 10, 5 };
            int sum = 33;

            int[] input2 = { 3, 34, 4, 12, 5, 2 };
             int sum2 = 9;

             int[] input3 = { 4, 6, 3, -9, -5, 1, 3, 0, 2 };
             int sum3 = 0;
            
            bool result = input2.GetSubArraysWithSumOptimized(sum2);

            Console.WriteLine(result);
            Console.Read();

        }


    }
}
